home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / NewsTicker.sit / NewsTicker / source code / InternetConfig / ICPPCGlue.c < prev    next >
C/C++ Source or Header  |  1997-02-17  |  18KB  |  764 lines

  1. #include <Types.h>
  2. #include <MixedMode.h>
  3. #include <Components.h>
  4.  
  5. #include "ICTypes.h"
  6. #include "ICAPI.h"
  7. #include "ICCAPI.h"
  8.  
  9. #pragma options align=mac68k
  10.  
  11. enum {
  12.     uppCallComponentProcInfo = kPascalStackBased
  13.         | RESULT_SIZE(kFourByteCode)
  14.         | STACK_ROUTINE_PARAMETER(1, kFourByteCode)
  15. };
  16.  
  17.  
  18. pascal ICError ICStart(ICInstance *inst, OSType creator)
  19. {
  20.     ICError junk;
  21.     ICError err;
  22.     long response;
  23.     struct {
  24.         char flags;
  25.         char size;
  26.         short what;
  27.         //
  28.         OSType creator;
  29.         //
  30.         ICInstance inst;
  31.     } start_component_params;
  32.     
  33.     *inst = nil;
  34.     if (Gestalt(gestaltComponentMgr, &response) == noErr) {
  35.         *inst = (ICInstance) OpenDefaultComponent(internetConfigurationComponentType, internetConfigurationComponentSubType);
  36.     };
  37.     if (*inst == nil) {
  38.         err = badComponentInstance;
  39.     } else {
  40.         start_component_params.flags = 0;
  41.         start_component_params.size = 4;
  42.         start_component_params.what = 0x00;
  43.         start_component_params.creator = creator;
  44.         start_component_params.inst = *inst;
  45.         err = CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &start_component_params);
  46.         if (err != noErr) {
  47.             junk = CloseComponent((ComponentInstance) *inst);
  48.             *inst = nil;
  49.         };
  50.     };
  51.     return(err);
  52. }
  53.  
  54. pascal ICError ICStop(ICInstance inst)
  55. {
  56.     ICError err;
  57.     ICError err2;
  58.     struct {
  59.         char flags;
  60.         char size;
  61.         short what;
  62.         //
  63.         //
  64.         ICInstance inst;
  65.     } stop_component_params;
  66.     
  67.     stop_component_params.flags = 0;
  68.     stop_component_params.size = 0;
  69.     stop_component_params.what = 0x01;
  70.     stop_component_params.inst = inst;
  71.     err = CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &stop_component_params);
  72.     err2 = CloseComponent((ComponentInstance) inst);
  73.     if (err == noErr) {
  74.         err = err2;
  75.     };
  76.     return(err);
  77. }
  78.  
  79. pascal ICError ICFindConfigFile(ICInstance inst, short count, ICDirSpecArrayPtr folders)
  80. {
  81.     struct {
  82.         char flags;
  83.         char size;
  84.         short what;
  85.         //
  86.         ICDirSpecArrayPtr folders;
  87.         short count;
  88.         //
  89.         ICInstance inst;
  90.     } find_config_file_params;
  91.     
  92.     find_config_file_params.flags = 0;
  93.     find_config_file_params.size = 6;
  94.     find_config_file_params.what = 0x02;
  95.     find_config_file_params.folders = folders;
  96.     find_config_file_params.count = count;
  97.     find_config_file_params.inst = inst;
  98.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &find_config_file_params));
  99. }
  100.  
  101. pascal ICError ICFindUserConfigFile(ICInstance inst, ICDirSpec *where)
  102. {
  103.     struct {
  104.         char flags;
  105.         char size;
  106.         short what;
  107.         //
  108.         ICDirSpec *where;
  109.         //
  110.         ICInstance inst;
  111.     } find_user_config_file_params;
  112.     
  113.     find_user_config_file_params.flags = 0;
  114.     find_user_config_file_params.size = 0x04;
  115.     find_user_config_file_params.what = 0x0E;
  116.     //
  117.     find_user_config_file_params.where = where;
  118.     //
  119.     find_user_config_file_params.inst = inst;
  120.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &find_user_config_file_params));
  121. }
  122.  
  123. pascal ICError ICSpecifyConfigFile(ICInstance inst, FSSpec *config)
  124. {
  125.     struct {
  126.         char flags;
  127.         char size;
  128.         short what;
  129.         //
  130.         FSSpec *config;
  131.         //
  132.         ICInstance inst;
  133.     } specify_config_file_params;
  134.     
  135.     specify_config_file_params.flags = 0;
  136.     specify_config_file_params.size = 4;
  137.     specify_config_file_params.what = 0x03;
  138.     specify_config_file_params.config = config;
  139.     specify_config_file_params.inst = inst;
  140.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &specify_config_file_params));
  141. }
  142.  
  143. pascal ICError ICGetSeed(ICInstance inst, long *seed)
  144. {
  145.     struct {
  146.         char flags;
  147.         char size;
  148.         short what;
  149.         //
  150.         long *seed;
  151.         //
  152.         ICInstance inst;
  153.     } get_seed_params;
  154.     
  155.     get_seed_params.flags = 0;
  156.     get_seed_params.size = 4;
  157.     get_seed_params.what = 0x04;
  158.     get_seed_params.seed = seed;
  159.     get_seed_params.inst = inst;
  160.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_seed_params));
  161. }
  162.  
  163. pascal ICError ICGetPerm(ICInstance inst, ICPerm *perm)
  164. {
  165.     struct {
  166.         char flags;
  167.         char size;
  168.         short what;
  169.         //
  170.         ICPerm *perm;
  171.         //
  172.         ICInstance inst;
  173.     } get_perm_params;
  174.     
  175.     get_perm_params.flags = 0;
  176.     get_perm_params.size = 4;
  177.     get_perm_params.what = 0x0D;
  178.     get_perm_params.perm = perm;
  179.     get_perm_params.inst = inst;
  180.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_perm_params));
  181. }
  182.  
  183. pascal ICError ICBegin(ICInstance inst, ICPerm perm)
  184. {
  185.     struct {
  186.         char flags;
  187.         char size;
  188.         short what;
  189.         //
  190.         ICPerm perm;
  191.         //
  192.         ICInstance inst;
  193.     } begin_params;
  194.     
  195.     begin_params.flags = 0;
  196.     begin_params.size = 2;
  197.     begin_params.what = 0x05;
  198.     begin_params.perm = perm;
  199.     begin_params.inst = inst;
  200.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &begin_params));
  201. }
  202.  
  203. pascal ICError ICGetPref(ICInstance inst, ConstStr255Param key, ICAttr *attr, Ptr buf, long *size)
  204. {
  205.     struct {
  206.         char flags;
  207.         char size;
  208.         short what;
  209.         //
  210.         long *psize;
  211.         Ptr buf;
  212.         ICAttr *attr;
  213.         Str255 *key;
  214.         //
  215.         ICInstance inst;
  216.     } get_pref_params;
  217.     
  218.     get_pref_params.flags = 0;
  219.     get_pref_params.size = 16;
  220.     get_pref_params.what = 0x06;
  221.     //
  222.     get_pref_params.psize = size;
  223.     get_pref_params.buf = buf;
  224.     get_pref_params.attr = attr;
  225.     get_pref_params.key = (Str255 *) key;
  226.     //
  227.     get_pref_params.inst = inst;
  228.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_pref_params));
  229. }
  230.  
  231. pascal ICError ICSetPref(ICInstance inst, ConstStr255Param key, ICAttr attr, Ptr buf, long size)
  232. {
  233.     struct {
  234.         char flags;
  235.         char size;
  236.         short what;
  237.         //
  238.         long psize;
  239.         Ptr buf;
  240.         ICAttr attr;
  241.         Str255 *key;
  242.         //
  243.         ICInstance inst;
  244.     } set_pref_params;
  245.     
  246.     set_pref_params.flags = 0;
  247.     set_pref_params.size = 16;
  248.     set_pref_params.what = 0x07;
  249.     //
  250.     set_pref_params.psize = size;
  251.     set_pref_params.buf = buf;
  252.     set_pref_params.attr = attr;
  253.     set_pref_params.key = (Str255 *) key;
  254.     //
  255.     set_pref_params.inst = inst;
  256.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &set_pref_params));
  257. }
  258.  
  259. pascal ICError ICGetPrefHandle(ICInstance inst, ConstStr255Param key, ICAttr *attr, Handle *prefh)
  260. {
  261.     struct {
  262.         char flags;
  263.         char size;
  264.         short what;
  265.         //
  266.         Handle *prefh;
  267.         ICAttr *attr;
  268.         Str255 *key;
  269.         //
  270.         ICInstance inst;
  271.     } get_pref_handle_params;
  272.     
  273.     get_pref_handle_params.flags = 0;
  274.     get_pref_handle_params.size = 0x0C;
  275.     get_pref_handle_params.what = 0x1A;
  276.     //
  277.     get_pref_handle_params.prefh = prefh;
  278.     get_pref_handle_params.attr = attr;
  279.     get_pref_handle_params.key = (Str255 *) key;
  280.     //
  281.     get_pref_handle_params.inst = inst;
  282.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_pref_handle_params));
  283. }
  284.  
  285. pascal ICError ICSetPrefHandle(ICInstance inst, ConstStr255Param key, ICAttr attr, Handle prefh)
  286. {
  287.     struct {
  288.         char flags;
  289.         char size;
  290.         short what;
  291.         //
  292.         Handle prefh;
  293.         ICAttr attr;
  294.         Str255 *key;
  295.         //
  296.         ICInstance inst;
  297.     } set_pref_handle_params;
  298.     
  299.     set_pref_handle_params.flags = 0;
  300.     set_pref_handle_params.size = 0x0C;
  301.     set_pref_handle_params.what = 0x1B;
  302.     //
  303.     set_pref_handle_params.prefh = prefh;
  304.     set_pref_handle_params.attr = attr;
  305.     set_pref_handle_params.key = (Str255 *) key;
  306.     //
  307.     set_pref_handle_params.inst = inst;
  308.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &set_pref_handle_params));
  309. }
  310.  
  311. pascal ICError ICCountPref(ICInstance inst, long *count)
  312. {
  313.     struct {
  314.         char flags;
  315.         char size;
  316.         short what;
  317.         //
  318.         long *count;
  319.         //
  320.         ICInstance inst;
  321.     } count_pref_params;
  322.     
  323.     count_pref_params.flags = 0;
  324.     count_pref_params.size = 4;
  325.     count_pref_params.what = 0x08;
  326.     count_pref_params.count = count;
  327.     count_pref_params.inst = inst;
  328.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &count_pref_params));
  329. }
  330.  
  331. pascal ICError ICGetIndPref(ICInstance inst, long n, Str255 key)
  332. {
  333.     struct {
  334.         char flags;
  335.         char size;
  336.         short what;
  337.         //
  338.         StringPtr key;
  339.         long n;
  340.         //
  341.         ICInstance inst;
  342.     } get_ind_pref_params;
  343.     
  344.     get_ind_pref_params.flags = 0;
  345.     get_ind_pref_params.size = 8;
  346.     get_ind_pref_params.what = 0x09;
  347.     //
  348.     get_ind_pref_params.key = (StringPtr) key;
  349.     get_ind_pref_params.n = n;
  350.     //
  351.     get_ind_pref_params.inst = inst;
  352.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_ind_pref_params));
  353. }
  354.  
  355. pascal ICError ICDeletePref(ICInstance inst, ConstStr255Param key)
  356. {
  357.     struct {
  358.         char flags;
  359.         char size;
  360.         short what;
  361.         //
  362.         Str255 *key;
  363.         //
  364.         ICInstance inst;
  365.     } delete_pref_params;
  366.     
  367.     delete_pref_params.flags = 0;
  368.     delete_pref_params.size = 4;
  369.     delete_pref_params.what = 0x0C;
  370.     //
  371.     delete_pref_params.key = (Str255 *) key;
  372.     //
  373.     delete_pref_params.inst = inst;
  374.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &delete_pref_params));
  375. }
  376.  
  377. pascal ICError ICEnd(ICInstance inst)
  378. {
  379.     struct {
  380.         char flags;
  381.         char size;
  382.         short what;
  383.         //
  384.         //
  385.         ICInstance inst;
  386.     } end_params;
  387.     
  388.     end_params.flags = 0;
  389.     end_params.size = 0;
  390.     end_params.what = 0x0A;
  391.     //
  392.     end_params.inst = inst;
  393.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &end_params));
  394. }
  395.  
  396. pascal ICError ICDefaultFileName(ICInstance inst, Str63 name)
  397. {
  398.     struct {
  399.         char flags;
  400.         char size;
  401.         short what;
  402.         //
  403.         StringPtr name;
  404.         //
  405.         ICInstance inst;
  406.     } default_file_name_params;
  407.     
  408.     default_file_name_params.flags = 0;
  409.     default_file_name_params.size = 4;
  410.     default_file_name_params.what = 0x0B;
  411.     default_file_name_params.name = (StringPtr) name;
  412.     default_file_name_params.inst = inst;
  413.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &default_file_name_params));
  414. }
  415.  
  416. pascal ICError ICGetComponentInstance(ICInstance inst, Ptr *component_inst)
  417. {
  418.     *component_inst = inst;
  419. }
  420.  
  421. pascal ICError ICEditPreferences(ICInstance inst, ConstStr255Param key)
  422. {
  423.     struct {
  424.         char flags;
  425.         char size;
  426.         short what;
  427.         //
  428.         Str255 *key;
  429.         //
  430.         ICInstance inst;
  431.     } edit_preferences_params;
  432.     
  433.     edit_preferences_params.flags = 0;
  434.     edit_preferences_params.size = 0x04;
  435.     edit_preferences_params.what = 0x0F;
  436.     //
  437.     edit_preferences_params.key = (Str255 *) key;
  438.     //
  439.     edit_preferences_params.inst = inst;
  440.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &edit_preferences_params));
  441. }
  442.  
  443. pascal ICError ICParseURL(ICInstance inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd, Handle url)
  444. {
  445.     struct {
  446.         char flags;
  447.         char size;
  448.         short what;
  449.         //
  450.         Handle url;
  451.         long *selEnd;
  452.         long *selStart;
  453.         long len;
  454.         Ptr data;
  455.         Str255 *hint;
  456.         //
  457.         ICInstance inst;
  458.     } parse_url_params;
  459.     
  460.     parse_url_params.flags = 0;
  461.     parse_url_params.size = 0x18;
  462.     parse_url_params.what = 0x10;
  463.     //
  464.     parse_url_params.url = url;
  465.     parse_url_params.selEnd = selEnd;
  466.     parse_url_params.selStart = selStart;
  467.     parse_url_params.len = len;
  468.     parse_url_params.data = data;
  469.     parse_url_params.hint = (Str255 *) hint;
  470.     //
  471.     parse_url_params.inst = inst;
  472.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &parse_url_params));
  473. }
  474.  
  475. pascal ICError ICLaunchURL(ICInstance inst, ConstStr255Param hint, Ptr data, long len, long *selStart, long *selEnd)
  476. {
  477.     struct {
  478.         char flags;
  479.         char size;
  480.         short what;
  481.         //
  482.         long *selEnd;
  483.         long *selStart;
  484.         long len;
  485.         Ptr data;
  486.         Str255 *hint;
  487.         //
  488.         ICInstance inst;
  489.     } launch_url_params;
  490.     
  491.     launch_url_params.flags = 0;
  492.     launch_url_params.size = 0x14;
  493.     launch_url_params.what = 0x11;
  494.     //
  495.     launch_url_params.selEnd = selEnd;
  496.     launch_url_params.selStart = selStart;
  497.     launch_url_params.len = len;
  498.     launch_url_params.data = data;
  499.     launch_url_params.hint = (Str255 *) hint;
  500.     //
  501.     launch_url_params.inst = inst;
  502.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &launch_url_params));
  503. }
  504.  
  505. pascal ICError ICMapFilename(ICInstance inst, ConstStr255Param filename, ICMapEntry *entry)
  506. {
  507.     struct {
  508.         char flags;
  509.         char size;
  510.         short what;
  511.         //
  512.         ICMapEntry *entry;
  513.         Str255 *filename;
  514.         //
  515.         ICInstance inst;
  516.     } map_filename_params;
  517.     
  518.     map_filename_params.flags = 0;
  519.     map_filename_params.size = 0x08;
  520.     map_filename_params.what = 0x18;
  521.     //
  522.     map_filename_params.entry = entry;
  523.     map_filename_params.filename = (Str255 *) filename;
  524.     //
  525.     map_filename_params.inst = inst;
  526.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &map_filename_params));
  527. }
  528.  
  529. pascal ICError ICMapTypeCreator(ICInstance inst, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry)
  530. {
  531.     struct {
  532.         char flags;
  533.         char size;
  534.         short what;
  535.         //
  536.         ICMapEntry *entry;
  537.         Str255 *filename;
  538.         OSType fCreator;
  539.         OSType fType;
  540.         //
  541.         ICInstance inst;
  542.     } map_type_creator_params;
  543.     
  544.     map_type_creator_params.flags = 0;
  545.     map_type_creator_params.size = 0x10;
  546.     map_type_creator_params.what = 0x19;
  547.     //
  548.     map_type_creator_params.entry = entry;
  549.     map_type_creator_params.filename = (Str255 *) filename;
  550.     map_type_creator_params.fCreator = fCreator;
  551.     map_type_creator_params.fType = fType;
  552.     //
  553.     map_type_creator_params.inst = inst;
  554.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &map_type_creator_params));
  555. }
  556.  
  557. pascal ICError ICMapEntriesFilename(ICInstance inst, Handle entries, ConstStr255Param filename, ICMapEntry *entry)
  558. {
  559.     struct {
  560.         char flags;
  561.         char size;
  562.         short what;
  563.         //
  564.         ICMapEntry *entry;
  565.         Str255 *filename;
  566.         Handle entries;
  567.         //
  568.         ICInstance inst;
  569.     } map_entries_filename_params;
  570.     
  571.     map_entries_filename_params.flags = 0;
  572.     map_entries_filename_params.size = 0x0C;
  573.     map_entries_filename_params.what = 0x1C;
  574.     //
  575.     map_entries_filename_params.entry = entry;
  576.     map_entries_filename_params.filename = (Str255 *) filename;
  577.     map_entries_filename_params.entries = entries;
  578.     //
  579.     map_entries_filename_params.inst = inst;
  580.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &map_entries_filename_params));
  581. }
  582.  
  583. pascal ICError ICMapEntriesTypeCreator(ICInstance inst, Handle entries, OSType fType, OSType fCreator, ConstStr255Param filename, ICMapEntry *entry)
  584. {
  585.     struct {
  586.         char flags;
  587.         char size;
  588.         short what;
  589.         //
  590.         ICMapEntry *entry;
  591.         Str255 *filename;
  592.         OSType fCreator;
  593.         OSType fType;
  594.         Handle entries;
  595.         //
  596.         ICInstance inst;
  597.     } map_entries_type_creator_params;
  598.     
  599.     map_entries_type_creator_params.flags = 0;
  600.     map_entries_type_creator_params.size = 0x14;
  601.     map_entries_type_creator_params.what = 0x1D;
  602.     //
  603.     map_entries_type_creator_params.entry = entry;
  604.     map_entries_type_creator_params.filename = (Str255 *) filename;
  605.     map_entries_type_creator_params.fCreator = fCreator;
  606.     map_entries_type_creator_params.fType = fType;
  607.     map_entries_type_creator_params.entries = entries;
  608.     //
  609.     map_entries_type_creator_params.inst = inst;
  610.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &map_entries_type_creator_params));
  611. }
  612.  
  613. pascal ICError ICCountMapEntries(ICInstance inst, Handle entries, long *count)
  614. {
  615.     struct {
  616.         char flags;
  617.         char size;
  618.         short what;
  619.         //
  620.         long *count;
  621.         Handle entries;
  622.         //
  623.         ICInstance inst;
  624.     } count_map_entries_params;
  625.     
  626.     count_map_entries_params.flags = 0;
  627.     count_map_entries_params.size = 0x08;
  628.     count_map_entries_params.what = 0x12;
  629.     //
  630.     count_map_entries_params.count = count;
  631.     count_map_entries_params.entries = entries;
  632.     //
  633.     count_map_entries_params.inst = inst;
  634.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &count_map_entries_params));
  635. }
  636.  
  637. pascal ICError ICGetIndMapEntry(ICInstance inst, Handle entries, long ndx, long *pos, ICMapEntry *entry)
  638. {
  639.     struct {
  640.         char flags;
  641.         char size;
  642.         short what;
  643.         //
  644.         ICMapEntry *entry;
  645.         long *pos;
  646.         long ndx;
  647.         Handle entries;
  648.         //
  649.         ICInstance inst;
  650.     } get_ind_map_entry;
  651.     
  652.     get_ind_map_entry.flags = 0;
  653.     get_ind_map_entry.size = 0x10;
  654.     get_ind_map_entry.what = 0x13;
  655.     //
  656.     get_ind_map_entry.entry = entry;
  657.     get_ind_map_entry.pos = pos;
  658.     get_ind_map_entry.ndx = ndx;
  659.     get_ind_map_entry.entries = entries;
  660.     //
  661.     get_ind_map_entry.inst = inst;
  662.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_ind_map_entry));
  663. }
  664.  
  665. pascal ICError ICGetMapEntry(ICInstance inst, Handle entries, long pos, ICMapEntry *entry)
  666. {
  667.     struct {
  668.         char flags;
  669.         char size;
  670.         short what;
  671.         //
  672.         ICMapEntry *entry;
  673.         long pos;
  674.         Handle entries;
  675.         //
  676.         ICInstance inst;
  677.     } get_map_entry;
  678.     
  679.     get_map_entry.flags = 0;
  680.     get_map_entry.size = 0x0C;
  681.     get_map_entry.what = 0x14;
  682.     //
  683.     get_map_entry.entry = entry;
  684.     get_map_entry.pos = pos;
  685.     get_map_entry.entries = entries;
  686.     //
  687.     get_map_entry.inst = inst;
  688.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &get_map_entry));
  689. }
  690.  
  691. pascal ICError ICSetMapEntry(ICInstance inst, Handle entries, long pos, ICMapEntry *entry)
  692. {
  693.     struct {
  694.         char flags;
  695.         char size;
  696.         short what;
  697.         //
  698.         ICMapEntry *entry;
  699.         long pos;
  700.         Handle entries;
  701.         //
  702.         ICInstance inst;
  703.     } set_map_entry;
  704.     
  705.     set_map_entry.flags = 0;
  706.     set_map_entry.size = 0x0C;
  707.     set_map_entry.what = 0x15;
  708.     //
  709.     set_map_entry.entry = entry;
  710.     set_map_entry.pos = pos;
  711.     set_map_entry.entries = entries;
  712.     //
  713.     set_map_entry.inst = inst;
  714.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &set_map_entry));
  715. }
  716.  
  717. pascal ICError ICDeleteMapEntry(ICInstance inst, Handle entries, long pos)
  718. {
  719.     struct {
  720.         char flags;
  721.         char size;
  722.         short what;
  723.         //
  724.         long pos;
  725.         Handle entries;
  726.         //
  727.         ICInstance inst;
  728.     } delete_map_entry;
  729.     
  730.     delete_map_entry.flags = 0;
  731.     delete_map_entry.size = 0x08;
  732.     delete_map_entry.what = 0x16;
  733.     //
  734.     delete_map_entry.pos = pos;
  735.     delete_map_entry.entries = entries;
  736.     //
  737.     delete_map_entry.inst = inst;
  738.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &delete_map_entry));
  739. }
  740.  
  741. pascal ICError ICAddMapEntry(ICInstance inst, Handle entries, ICMapEntry *entry)
  742. {
  743.     struct {
  744.         char flags;
  745.         char size;
  746.         short what;
  747.         //
  748.         ICMapEntry *entry;
  749.         Handle entries;
  750.         //
  751.         ICInstance inst;
  752.     } add_map_entry;
  753.     
  754.     add_map_entry.flags = 0;
  755.     add_map_entry.size = 0x08;
  756.     add_map_entry.what = 0x17;
  757.     //
  758.     add_map_entry.entry = entry;
  759.     add_map_entry.entries = entries;
  760.     //
  761.     add_map_entry.inst = inst;
  762.     return(CallUniversalProc(CallComponentUPP, uppCallComponentProcInfo, &add_map_entry));
  763. }
  764.